package com.east.sng.service.impl;

import com.east.sng.dao.SyslogDao;
import com.east.sng.entity.param.SyslogParam;
import com.east.sng.entity.result.SyslogInfo;
import com.east.sng.service.SyslogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author menery
 * @date: 2021/03/06
 * @Description:
 **/
@Service
public class SyslogServiceImpl implements SyslogService {
    @Autowired
    private SyslogDao syslogDao;

    @Override
    public List<SyslogInfo> findSyslogs() {
        return this.syslogDao.selectSyslogs();
    }

    @Override
    public void addSyslog(SyslogParam syslog) {
        this.syslogDao.insertSyslog(syslog);
    }

    @Override
    public boolean batchRemoveSyslogs(List<Integer> syslogIds) {
        return this.syslogDao.batchDeleteSyslogs(syslogIds) > 0;
    }
}
